From: Jeroen van der Heijden Date: Fri, 5 Oct 2018 21:00:03 +0000 (+0200) Subject: Update times X-Git-Tag: archive/raspbian/2.0.44-1+rpi1~1^2~3^2~8^2~31 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9e87dbfd97679bdf36183b3e88e6388a6916ee69;p=siridb-server.git Update times --- diff --git a/README.md b/README.md index 7dac9b29..99d2dea1 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ SiriDB is a highly-scalable, robust and super fast time series database. * [SiriDB Prompt](#siridb-prompt) * [Grafana](#grafana) * [API/Query language](#query-language) - + --------------------------------------- ## Installation @@ -32,15 +32,15 @@ The .deb package installs a configuration file at `/etc/siridb/siridb.conf`. You ### Compile from source >From version 2.0.19 libcleri is not included as part of this source anymore ->and needs to be installed separately. libcleri can be found here: +>and needs to be installed separately. libcleri can be found here: >[https://github.com/transceptor-technology/libcleri](https://github.com/transceptor-technology/libcleri) #### Linux Install the following requirements: (Ubuntu) ``` sudo apt install libpcre2-dev -sudo apt install libuv1-dev -sudo apt install uuid-dev +sudo apt install libuv1-dev +sudo apt install uuid-dev ``` Compile (replace Release with Debug for a debug build): @@ -66,7 +66,7 @@ brew install libuv brew install ossp-uuid ``` Compile (replace Release with Debug for a debug build): -``` +``` cd ./Release export CFLAGS="-I/usr/local/include" export LDFLAGS="-L/usr/local/lib" @@ -87,7 +87,7 @@ An example configuration file can be found here: [SiriDB Admin](https://github.com/SiriDB/siridb-admin) is required for creating a new database or expanding an existing database with a new server. Documentation on how to install and use the admin tool can be found at the [siridb-admin](https://github.com/SiriDB/siridb-admin#readme) github project. Binaries are available for most platforms and can be downloaded from [here](https://github.com/SiriDB/siridb-admin/releases/latest). ## Using SiriDB -SiriDB has several tools available to connect to a SiriDB database. +SiriDB has several tools available to connect to a SiriDB database. ### SiriDB Connectors The following native connectors are available: @@ -95,7 +95,7 @@ The following native connectors are available: - [Python](https://github.com/SiriDB/siridb-connector#readme) - [Go](https://github.com/SiriDB/go-siridb-connector#readme) - [Node.js](https://github.com/SiriDB/siridb-nodejs-addon#readme) - + When not using one of the above, you can still communicate to SiriDB using [SiriDB HTTP](#siridb-http). ### SiriDB HTTP @@ -109,3 +109,14 @@ When not using one of the above, you can still communicate to SiriDB using [Siri ## Query language Documentation about the query language can be found at https://siridb.net/documentation. + +## Running integration +Build integration test image +``` +docker build -t siridb/itest -f itest/Dockerfile . +``` + +Run integration tests +``` +docker run siridb/itest:latest +``` \ No newline at end of file diff --git a/itest/test_buffer.py b/itest/test_buffer.py index 28a8e84c..c3d387a0 100644 --- a/itest/test_buffer.py +++ b/itest/test_buffer.py @@ -50,7 +50,7 @@ class TestBuffer(TestBase): result = await self.server0.stop() self.assertTrue(result) self.server0.set_buffer_size(self.db, buffer_size) - await self.server0.start(sleep=5) + await self.server0.start(sleep=20) await self.client0.connect() res = await self.client0.query('show buffer_size') self.assertEqual(res['data'][0]['value'], buffer_size) @@ -61,7 +61,7 @@ class TestBuffer(TestBase): result = await self.server0.stop() self.assertTrue(result) self.server0.set_buffer_path(self.db, buffer_path) - await self.server0.start(sleep=5) + await self.server0.start(sleep=20) await self.client0.connect() res = await self.client0.query('show buffer_path') self.assertEqual(res['data'][0]['value'], buffer_path) diff --git a/itest/test_compression.py b/itest/test_compression.py index 7f4b16cf..411dc10e 100644 --- a/itest/test_compression.py +++ b/itest/test_compression.py @@ -108,7 +108,7 @@ class TestCompression(TestBase): result = await self.server0.stop() self.assertTrue(result) - await self.server0.start(sleep=10) + await self.server0.start(sleep=20) await self.client0.connect() # Check the result after rebooting the server diff --git a/itest/test_insert.py b/itest/test_insert.py index cb2f8caa..d5c71ff5 100644 --- a/itest/test_insert.py +++ b/itest/test_insert.py @@ -138,9 +138,9 @@ class TestInsert(TestBase): await self.client0.insert([{'name': '', 'points': [[1, 0]]}]) await self.db.add_replica(self.server1, 0, sleep=30) - # await self.db.add_pool(self.server1, sleep=3) + # await self.db.add_pool(self.server1, sleep=30) - await self.assertIsRunning(self.db, self.client0, timeout=3) + await self.assertIsRunning(self.db, self.client0, timeout=30) await self.client1.connect() diff --git a/itest/test_log.py b/itest/test_log.py index 741cd730..9033aa32 100644 --- a/itest/test_log.py +++ b/itest/test_log.py @@ -226,7 +226,7 @@ class TestLog(TestBase): result = await self.server0.stop() self.assertTrue(result) - await self.server0.start(sleep=10) + await self.server0.start(sleep=20) await self.client0.connect() diff --git a/itest/test_pool.py b/itest/test_pool.py index d42078c0..5e4bde9e 100644 --- a/itest/test_pool.py +++ b/itest/test_pool.py @@ -78,7 +78,7 @@ class TestPool(TestBase): await asyncio.wait_for(task1, None) await asyncio.wait_for(task2, None) - await asyncio.sleep(1) + await asyncio.sleep(2) await self.assertSeries(self.client0, series) await self.assertSeries(self.client1, series) diff --git a/itest/test_server.py b/itest/test_server.py index 62cac4ee..6ba410e7 100644 --- a/itest/test_server.py +++ b/itest/test_server.py @@ -88,7 +88,7 @@ class TestServer(TestBase): self.server1.listen_backend_port = 9111 self.server1.create() - await self.server1.start(sleep=35) + await self.server1.start(sleep=20) await asyncio.sleep(35) @@ -101,7 +101,7 @@ class TestServer(TestBase): {'name': 'server', 'value': 'localhost:9111'}]) await self.db.add_replica(self.server2, 1) - await self.assertIsRunning(self.db, self.client0, timeout=10) + await self.assertIsRunning(self.db, self.client0, timeout=35) with self.assertRaisesRegex( QueryError, @@ -121,7 +121,7 @@ class TestServer(TestBase): result = await self.server2.stop() self.assertTrue(result) - await self.server1.start(sleep=10) + await self.server1.start(sleep=30) result = await self.client1.query('show status') self.assertEqual(result.pop('data'), [ diff --git a/itest/test_syslog.py b/itest/test_syslog.py index 16f99075..ae17878b 100644 --- a/itest/test_syslog.py +++ b/itest/test_syslog.py @@ -72,7 +72,7 @@ class TestSyslog(TestBase): async def run(self): await self.client0.connect() - # await self.db.add_pool(self.server1, sleep=3) + # await self.db.add_pool(self.server1, sleep=30) await self.db.add_replica(self.server1, 0, sleep=30) diff --git a/itest/test_user.py b/itest/test_user.py index 505380ba..0015124c 100644 --- a/itest/test_user.py +++ b/itest/test_user.py @@ -63,12 +63,13 @@ class TestUser(TestBase): await self.db.add_replica(self.server1, 0) await self.assertIsRunning(self.db, self.client0, timeout=20) + await asyncio.sleep(5) await self.db.add_pool(self.server2) await self.client1.connect() await self.client2.connect() - await asyncio.sleep(15) + await asyncio.sleep(20) result = await self.client1.query('list users where access < full ') self.assertEqual(result.pop('users'), [['sasientje', 'modify']]) diff --git a/itest/testing/testbase.py b/itest/testing/testbase.py index 8008e65f..1cdd4d38 100644 --- a/itest/testing/testbase.py +++ b/itest/testing/testbase.py @@ -24,7 +24,7 @@ def default_test_setup(nservers=1, **kwargs): time.sleep(2.0) - await self.db.create_on(self.server0, sleep=2) + await self.db.create_on(self.server0, sleep=5) close = await func(self)